from enum import Enum


class FontMode(Enum):
    V_FIRST_TOP_BOTTOM__LAST_LEFT_RIGHT = "纵向，先上下后左右"
    V_FIRST_LEFT_RIGHT__LAST_TOP_BOTTOM = "纵向，先左右后上下"
    H_FIRST_TOP_BOTTOM__LAST_LEFT_RIGHT = "横向，先上下后左右"
    H_FIRST_LEFT_RIGHT__LAST_TOP_BOTTOM = "横向，先左右后上下"

    @staticmethod
    def values():
        return tuple(f.value for f in FontMode)

    @staticmethod
    def names():
        return tuple(f.name.lower() for f in FontMode)

    @staticmethod
    def get_name(value):
        for k, v in FontMode.__members__.items():
            if v.value == value:
                return k.lower()
        return None
